]> snippets.scripts.mit.edu Git - Scripts/git/.git/blob - sipbmp3-itunes.bak/sipbmp3 - Volume Set.applescript
Changed the sipbmp3-itunes folder into a submodule, so that the repo can reside in...
[Scripts/git/.git] / sipbmp3-itunes.bak / sipbmp3 - Volume Set.applescript
1 -- Changelog:
2 --
3 -- 5 April 2009 -> pquimby created initial version
4 --
5
6 -- Usage:
7 --  This script will set the volume of sipbmp3 (assuming you have remctl) to your iTunes volume scaled to the max value of 31 (which is the max volume for sipbmp3 at the time this script was written).
8
9 -- Ex:// If your iTunes volume is set at 50% then you will set the sipbmp3 volume to .50*31 or roughly 15.
10
11 tell application "iTunes"
12         set vol to (sound volume * 31 / 100)
13 end tell
14
15 set command to "/usr/local/bin/remctl zsr volume set " & vol
16 do shell script command